package com.ecoolex.ying.space.ws;

import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;
import com.ecoolex.ying.space.entity.PickGoods;
import com.ecoolex.ying.space.entity.PickGoodsChannel;
import com.ecoolex.ying.space.entity.PickGoodsProduct;
import com.ecoolex.ying.space.entity.PickGoodsWithBLOBs;
import com.ecoolex.ying.space.pojo.EditPickGoodsDTO;
import com.ecoolex.ying.space.pojo.EditPickGoodsProductDTO;
import com.ecoolex.ying.space.pojo.QueryPickGoodsDTO;
import com.ecoolex.ying.space.pojo.SearchPickGoodsDTO;

import java.util.List;

public interface PickGoodsService {
    PickGoodsWithBLOBs createPickGoods(Integer goodsId, EditPickGoodsDTO add, String createUser) throws BizException;

    void updatePickGoods(Integer pickGoodsId, EditPickGoodsDTO edit, String updateUser) throws BizException;

    void deletePickGoods(PickGoodsWithBLOBs record, String updateUser) throws BizException;

    void onlinePickGoods(PickGoodsWithBLOBs record, String updateUser) throws BizException;

    void offlinePickGoods(PickGoodsWithBLOBs record, String updateUser) throws BizException;

    long countPickGoodsByClassifyId(Integer classifyId);

    long countPickGoodsByGoodsId(Integer goodsId);

    long countPickGoodsByLabelId(Integer labelId);

    PickGoodsWithBLOBs getPickGoodsById(Integer pickGoodsId);

    Pagination<PickGoodsWithBLOBs> searchPickGoods(SearchPickGoodsDTO query, Page page);

    Pagination<PickGoodsWithBLOBs> queryPickGoods(QueryPickGoodsDTO query, Sorting[] sorts, Page page);

    Pagination<PickGoodsWithBLOBs> queryPickGoodsByUserFavorite(Integer userId, String keyword, Page page);

    PickGoodsProduct createProduct(PickGoods goods, Integer productId, EditPickGoodsProductDTO add, String createUser) throws BizException;

    void updateProduct(Integer pickProductId, EditPickGoodsProductDTO edit, String updateUser) throws BizException;

    void deleteProduct(PickGoodsProduct record, String updateUser) throws BizException;

    PickGoodsProduct getProductById(Integer pickProductId);

    List<PickGoodsProduct> queryProductByPickGoodsId(Integer pickGoodsId);

    PickGoodsChannel createChannel(PickGoodsChannel record, String createUser) throws BizException;

    void updateChannel(PickGoodsChannel record, String updateUser) throws BizException;

    void deleteChannel(PickGoodsChannel record, String updateUser) throws BizException;

    PickGoodsChannel getChannelById(Integer channelId);

    List<PickGoodsChannel> queryChannelByPickGoodsId(Integer pickGoodsId);
}
